package com.sh.data.engine.domain.common.model.domain;

public class Position {

    protected float width;

    protected float height;

    protected float x;

    protected float y;

    public void setWidth(float width) {
        this.width = width;
    }

    public void setHeight(float height) {
        this.height = height;
    }

    public void setX(float x) {
        this.x = x;
    }

    public void setY(float y) {
        this.y = y;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof Position)) {
            return false;
        }
        Position other = (Position) o;
        return !other.canEqual(this) ? false
            : ((Float.compare(getWidth(), other.getWidth()) != 0) ? false
            : ((Float.compare(getHeight(), other.getHeight()) != 0) ? false
            : ((Float.compare(getX(), other.getX()) != 0) ? false
            : (!(Float.compare(getY(), other.getY()) != 0)))));
    }

    protected boolean canEqual(Object other) {
        return other instanceof Position;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        result = result * 59 + Float.floatToIntBits(getWidth());
        result = result * 59 + Float.floatToIntBits(getHeight());
        result = result * 59 + Float.floatToIntBits(getX());
        return result * 59 + Float.floatToIntBits(getY());
    }

    public String toString() {
        return "Position(width=" + getWidth() + ", height=" + getHeight() + ", x=" + getX() + ", y="
            + getY() + ")";
    }

    public float getWidth() {
        return this.width;
    }

    public float getHeight() {
        return this.height;
    }

    public float getX() {
        return this.x;
    }

    public float getY() {
        return this.y;
    }
}